﻿// <copyright file="BlogEntryModel.cs" company="Clever Software">
// Copyright (c) 2013, 2014 All Right Reserved, http://www.cleversoftware.by
//
// This source is subject to the Microsoft Permissive License.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Clever Software</author>
// <email>info@cleversoftware.by</email>
// <date>2014-02-04</date> 
// <summary>CleverCMS source code</summary>

namespace CleverCMS.Blog.Services.ViewModels
{
    using System.Collections.Generic;
    using Blog.Data.Entities;
    /// <summary>
    /// Model for a single <see cref="BlogEntry"/>.
    /// </summary>
    public class BlogEntryModel
    {
        /// <summary>
        /// Gets or sets the blog entry.
        /// </summary>
        public BlogEntry BlogEntry { get; set; }

        /// <summary>
        /// Gets or sets the blog entry.
        /// </summary>
        public ICollection<BlogEntryComment> Comments { get { return BlogEntry.BlogEntryComments; } }

        /// <summary>
        /// Gets or sets the blog entry.
        /// </summary>
        public int Id { get { return BlogEntry.Id; } }

        /// <summary>
        /// Gets or sets the blog entry.
        /// </summary>
        public string Type { get { return "blog"; } }

        /// <summary>
        /// Gets or sets the blog entry.
        /// </summary>
        public BlogEntry[] RelatedBlogEntries { get; set; }

        /// <summary>
        /// Gets the header.
        /// </summary>
        public string Header
        {
            get
            {
                return this.BlogEntry.Header;
            }
        }
        
        /// <summary>
        /// Gets or sets a value indicating whether the comments form should be visible.
        /// </summary>
        public bool HideNewCommentsForm { get; set; }
    }
}